package com.zy.cat.entity.run;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import com.zy.cat.entity.primary.DailyStepHistoryPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫用户每日运动步数记录历史信息
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_run_step_history", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "dstatus", columnList = "dstatus"),
		@Index(name = "ltime", columnList = "ltime"),
		@Index(name = "ctime", columnList = "ctime") })
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("9趣猫用户每日运动步数记录历史信息")
@IdClass(DailyStepHistoryPrimary.class)
public class DailyStepHistory {
	
	@Id
	@Column(columnDefinition = "VARCHAR(20) NOT NULL COMMENT '用户账号ID[9趣猫用户每日运动步数记录历史信息]'")
	@ApiModelProperty(value = "用户账号ID", example = "fe53d6a4fa29641")
	private String pid;
	
	@Id
	@Column(columnDefinition = "VARCHAR(10) NOT NULL  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22")
	private String ctime;
	
	@Column(columnDefinition = "INT(6) DEFAULT '0' COMMENT '每日步数'")
	@ApiModelProperty(value = "每日步数", example = "2")
	private int steps;
	
	@Column(columnDefinition = "INT(2) DEFAULT '1' COMMENT '审核状态，（-1：不结算、0.结算中、1.已结算）'")
	@ApiModelProperty(value = "审核状态，（-1：不结算、0.结算中、1.已结算）", example = "1")
	private int dstatus;
	
	@Column(columnDefinition = "VARCHAR(24) NOT NULL  COMMENT '最后更改时间'")
	@ApiModelProperty(value = "最后更改时间", example = "2019-02-22 12:56:56:666")
	private String ltime;
	
	@Column(columnDefinition = "VARCHAR(200) DEFAULT '-' COMMENT '备注'")
	@ApiModelProperty(value = "备注", example = "备注")
	private String info = "-";
	
	public DailyStepHistory(String pid) {
		super();
		this.pid = pid;
	}

	public DailyStepHistory(String pid, String ctime, int steps, String ltime) {
		super();
		this.pid = pid;
		this.ctime = ctime;
		this.steps = steps;
		this.ltime = ltime;
	}

	public DailyStepHistory(String pid, String ctime, int steps, int dstatus, String ltime) {
		super();
		this.pid = pid;
		this.ctime = ctime;
		this.steps = steps;
		this.dstatus = dstatus;
		this.ltime = ltime;
	}
	
	
}
